package day04;
import java.util.Scanner;//1.导入一个扫描仪
//Scanner的演示
public class ScannerDemo {
    public static void main(String[] args) {

        Scanner scanner = new Scanner(System.in);//2.新建一个扫描仪
        System.out.println("请输入一个整数:");
        int age = scanner.nextInt();//用扫描仪扫描一个整数并赋值给age

        System.out.println("请输入一个商品价格:");
        double price = scanner.nextDouble();//扫描一个小数并赋值给price
        System.out.println("年龄为:"+age+",价格为:"+price);

    }
}
